The invention relates to a method and an apparatus for determining a defocussing value, and a method and an apparatus for image-based determination of a dimensional size.
So-called profile projectors, which constitute an optical measuring system, in which an object is illuminated in transmission or reflection, are known. A shadow image or reflection image of the object is imaged on a sensor by way of an optical system, said image, as a rule, having been reduced in size. Dimensional sizes, in particular object dimensions, may be ascertained on the basis of the image generated in this way, in particular through knowledge of the imaging scale. Optical systems, in particular objectives, which ensure a constant imaging dimension over a certain range in the position of the object relative to the optical system are required in such profile projectors. Firstly, this allows measurement of three-dimensional objects, in which the effective imaging scale does not vary in depth. Secondly, such optical systems are less sensitive to defocussing. By way of example, this is described in: “Atif, M.; Optimal Depth Estimation and Extended Depth of Field from Single Images by Computational Imaging using Chromatic Aberrations; Heidelberg: Ruperto-Carlo University of Heidelberg, Germany, 2013”. Therefore, as a rule, use is made of optical systems with a so-called telecentric objective, which is distinguished by virtue of the chief rays of all image points extending parallel to the optical axis of the optical system to the greatest possible extent.
However, in reality, such telecentric optical systems are only telecentric for a specific wavelength. The finite selection of lens materials and production tolerances lead to a deviation from the ideal telecentricity, the so-called telecentric error. On account of this telecentric error, the chief rays do not extend exactly parallel to the optical axis of the optical system; instead, they include an angle φ therewith, the value of said angle as a rule depending on the considered field point xF and the employed wavelength, i.e. φ=φ(λ,x). Here, the field point xF denotes a spatial point. This telecentric error φ leads to an optical aberration, depending on the defocussing Δz and the wavelength, of object features, wherein said optical aberration may be described byΔx=f(λ,xF),Δz)  Formula 1as the difference between the theoretically correct position in the image and the actual incorrect position in the image. In the vicinity of a wavelength-dependent focal plane of the optical system, a linear approximation of the optical aberration in accordance withΔx=φ(λ,xF)Δz  Formula 2is a sufficiently good approximation for a specific wavelength.
The telecentric error of commercially available objectives lies at several 1E-6 rad. This value can only be reduced further with extremely high design and manufacturing outlay, which would lead to excessively high costs of the objectives.
In accordance with formulae 1 and 2, a high measurement accuracy may be achieved despite a telecentric error if the so-called defocussing value Δz of the image feature and the telecentric error are known. In this case, a correction value of the order of the optical aberration may be determined and used to correct the position in the image and/or correct the dimensional size determined on the basis of the image.
The telecentric error may be ascertained relatively easily. Either it may be determined from the design parameters of the optical system, in particular of the objective, or it may be determined, in particular retrospectively, by calibrating the optical system, i.e. measuring a known object for various defocussing values and wavelengths.
US 2013/0308018 A1 discloses an image processing device comprising a capturing device configured to subdivide an image into a multiplicity of portions and determine an object distance and a defocussing value for each portion. The defocussing value for a portion is determined by virtue of determining a difference between a distance from an object imaged in the portion and a distance from a main object imaged in a different portion. Here, distances denote distances of the object from an optical system. The distances are captured in a focus scanning procedure. Further, the main object is arranged in a focal plane. Consequently, the document does not disclose an image-based determination of the defocussing value.
WO 2009/141403 A1 discloses a technique for removing effects of a lateral chromatic aberration. The document discloses no determination of a defocussing value.
However, a technical problem arising is that of developing a method and an apparatus for determining a defocussing value, which facilitate a determination which is exact and easy to implement from a computational point of view. Further, another technical problem arising is that of developing a method and an apparatus for image-based determination of a dimensional size, which facilitate an accurate determination of the dimensional size.